/**
 * @author LIU YUAN
 * @date May 15, 2011 11:12:21 AM
 * @param <T>
 */
#include "StdAfx.h"
#include "DataBlock.h"
using namespace upupc;

DataBlock::DataBlock(CHAR* data,DWORD size)
:buffer(0),
bufferSize(0)
{
	buffer = data;
	bufferSize = size;
}


DataBlock::~DataBlock(void)
{
}

CHAR*
DataBlock::parse(DWORD eip)
{
	CHAR* buffer2 = new CHAR[bufferSize];
	memcpy_s(buffer2,bufferSize,buffer,bufferSize);
	return buffer2;
}

DWORD
DataBlock::size()
{
	return bufferSize;
}
